var proxy = require("http-proxy-middleware");
module.exports = {
  entry: "./index.js",

  output: {
    filename: "bundle.js",
    publicPath: ""
  },

  module: {
    loaders: [
      {
        test: /\.js$/,
        exclude: /node_modules/,
        loader:
          "babel-loader?presets[]=es2015&presets[]=react&presets[]=stage-3&presets[]=stage-0"
      },
      { test: /\.css$/, loader: "style-loader!css-loader" },
      {
        // 专供iconfont方案使用的，后面会带一串时间戳，需要特别匹配到
        test: /\.(woff|woff2|svg|eot|ttf)\??.*$/,
        loader: 'file?name=./static/fonts/[name].[ext]',
      },
      {
        test: /\.less?$/,
        loaders: [
            'style-loader',
            'css-loader',
            'less-loader?{"sourceMap":false}'
          ]
        },
        {
          test: /\.(png|jpg|gif)$/,
          loader: 'url-loader?limit=8192&name=./img/[hash].[ext]'
        },
        { test: /\.png$/, loader: "file-loader?name=images/[hash:8].[name].[ext]" }
    ]
  }
};
